package com.cskaoyan.bean.usersadmin;

import com.cskaoyan.bean.po.MarketFeedback;
import lombok.Data;

import java.util.List;

/**
 * ClassName: FeedbackData
 * Description:
 * date: 2022/6/5 21:37
 *
 * @author bruce
 * @since JDK 8
 */
@Data
public class FeedbackData {

    /**
     * total : 49
     * pages : 3
     * limit : 20
     * page : 1
     * list : [{"id":49,"userId":1,"username":"user123","mobile":"12345678900","feedType":"商品相关","content":"abvadfs ","status":1,"hasPicture":true,"picUrls":["http://182.92.235.201:8083/wx/storage/fetch/q0goltt7mf4ipfwey4vz.jpg"],"addTime":"2022-05-11 11:44:14","updateTime":"2022-05-11 11:44:14","deleted":false},{"id":48,"userId":1,"username":"user123","mobile":"13312341234","feedType":"功能异常","content":"aaaaaaaa","status":1,"hasPicture":true,"picUrls":["http://182.92.235.201:8083/wx/storage/fetch/0f4hinvvy8vte8e3txt9.jpeg"]
     */

    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MarketFeedback> list;

    public static FeedbackData data(long total, int pages, int limit, int page, List<MarketFeedback> list) {
        FeedbackData feedbackData = new FeedbackData();
        feedbackData.setTotal((int) total);
        feedbackData.setPages(pages);
        feedbackData.setLimit(limit);
        feedbackData.setPage(page);
        feedbackData.setList(list);
        return feedbackData;
    }
}
